﻿using AprenderComendo.Models;
using FluentNHibernate.Mapping;

namespace AprenderComendo.Infrastructure.FluentMappings
{
    public class PresentationMap: ClassMap<Presentation>
    {
        public PresentationMap()
        {
            Id(p => p.Id).GeneratedBy.Identity();
            Map(p => p.Title).Access.CamelCaseField();
            Map(p => p.Date).Access.CamelCaseField();
            HasMany(p => p.Authors).Cascade.AllDeleteOrphan().Access.CamelCaseField();
        }
    }
}